Skip to content

Conversation

@kpieckiel
Copy link

Large numbers of hosts (/0 and /1 subnets) are overflowing and showing as a negative number. Changing 1<<(32-mask) to 2**(32-mask) causes JavaScript to calculate the integer properly.

Large numbers of hosts (/0 and /1 subnets) are overflowing and showing
as a negative number.  Changing 1<<(32-mask) to 2**(32-mask) causes
JavaScript to calculate the integer properly.
@jcostom
Copy link
Owner

jcostom commented Jan 6, 2023

Looks good, thanks!

@jcostom jcostom merged commit c294ca9 into jcostom:master Jan 6, 2023
kpieckiel pushed a commit to kpieckiel/subnets that referenced this pull request Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants